package com.cn.study007;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName Test70017.java
 * @Description
 * @createTime 2023年05月14日 17:02:00
 */
public class Test70017 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = 0;
        int count = 0;
        System.out.println("1-100之间不能被7整除的数：");
        for (int i = 1; i <= 100; i++) {
            if (i % 7 != 0) {
                System.out.print(i + " ");
                num += i;
                count++;
            }
            if (count % 4 == 0) {
                System.out.println();
            }
        }
        System.out.println("\n1-100之间不能被7整除的数的和为：" + num);
    }
}
